﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Micro.Core.FrameWork.Cache
{
    public interface ICache
    {
        bool Exist(string key);

        bool Set(string key, object value);

        bool Set(string key, string value, int timeExpire);

        bool Set<T>(string key, T t);

        bool Set<T>(string key, T t, int timeExpire);

        string Get(string key);

        Task<T> Get<T>(string key);

        bool Expire(string key, int timeExpire);
    }
}
